// pages/home/home.js
const app =  getApp();

Page({
  data:{
    city:""
  },
  handleClick(){
    wx.navigateTo({
      url: '/pages/city/city'
    })
  },
  onLoad(){
    app.callback = ()=>{
      // console.log("onLoad")
      var city = app.globalData.currentCity
      this.setData({
        city
      })
    }
      
    /* app.callback=()=>{
      console.log("onLoad")
    } */
    
  },
  onShow(){
    var city = app.globalData.currentCity
    this.setData({
      city
    })
  }
})